﻿using System;
using System.Collections.Generic;
using System.Text;
using DevExpress.Xpo;
using Component;

namespace Component
{
    public class TiGiaUSDVNDDB :Base
    {
        /// <summary>
        /// public static TyGia GetObjectByid(int id)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static Component.TiGiaUSDVND GetObjectByid(int id, bool admin)
        {
            XPCollection<TiGiaUSDVND> _xpTyGia = new XPCollection<TiGiaUSDVND>(KetNoiCSDL.session);
            _xpTyGia.Filter =FilterById(id, admin);
            if (_xpTyGia.Count > 0)
            {
                return _xpTyGia[0];
            }
            return null;
        } 
    }
}
